package com.example.mxs.util;

import java.util.HashMap;
import java.util.Map;
/*
 *返回数据的元数据
 */
public class MetaData {
    public int status;
    public String msg;

    public MetaData(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public static final MetaData CODE_200 = new MetaData(200, "请求成功");
    public static final MetaData CODE_201 = new MetaData(201, "创建成功");
    public static final MetaData CODE_204 = new MetaData(204, "删除成功");
    public static final MetaData CODE_400 = new MetaData(400, "请求的地址不存在或者包含不支持的参数");
    public static final MetaData CODE_401 = new MetaData(401, "未授权");
    public static final MetaData CODE_403= new MetaData(403, "被禁止访问");
    public static final MetaData CODE_404 = new MetaData(404, "请求的资源不存在");
    public static final MetaData CODE_422 = new MetaData(422, "当创建一个对象时，发生一个验证错误");
    public static final MetaData CODE_500 = new MetaData(500, "内部错误");
}
